﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="MatchUpload.aspx.cs" Inherits="SoccerEvaluator.WebSite.MatchUpload" %>


<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="css/MatchUpload.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">

        $(document).ready(function ()
        {
            FB.getLoginStatus(function (response)
            {
                LoadUserName(response);
            });

        });

        function LoadUserName(response)
        {
            if (response.status === 'connected')
            {
                FB.api('/me', function (response)
                {
                    console.log('Successful login for: ' + response.name);

                    $('#<%=txtName.ClientID%>').val(response.name);

                });
            }
        }
    </script>
    <table>
        <tr>
            <td align="center" nowrap="nowrap">
                <asp:Panel runat="server" ID="pnltext" Width="500px" CssClass="ScoreLine">
                    <%=Resources.Resource.Name%>
                    <asp:TextBox runat="server" ID="txtName" CssClass="Goals" Width="100%"></asp:TextBox>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td align="center" nowrap="nowrap">&nbsp;</td>
        </tr>
        <tr>
            <td align="center">
                <asp:Label ID="Label2" runat="server" Text="<% $ Resources:Resource,FillEntireForm %>"
                    CssClass="TableTitles"></asp:Label>
            </td>
        </tr>
        <tr>
            <td bgcolor="white">
                <asp:Label ID="lblMessage" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Repeater runat="server" ID="lstScores">
                    <HeaderTemplate>
                        <table border="0" bordercolor="gray" cellpadding="3" cellspacing="0">
                            <tr>
                                <td></td>
                                <td align="center">
                                    <asp:Label ID="Label8" runat="server" Text="<% $ Resources:Resource, Date %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label1" runat="server" Text="<% $ Resources:Resource, Location %>"
                                        CssClass="TableTitles"></asp:Label>
                                </td>
                                <td></td>
                                <td align="center">
                                    <asp:Label ID="Label4" runat="server" Text="<% $ Resources:Resource, Team %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label5" runat="server" Text="<% $ Resources:Resource, Goals %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td></td>
                                <td align="center">
                                    <asp:Label ID="Label6" runat="server" Text="<% $ Resources:Resource, Team %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label7" runat="server" Text="<% $ Resources:Resource, Goals %>" CssClass="TableTitles"></asp:Label>
                                </td>
                            </tr>
                    </HeaderTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                    <ItemTemplate>
                        <tr>
                            <td width="100px" align="center">
                                <asp:Label runat="server" ID="lblIndex" Text='<%#Eval("Index") %>'></asp:Label>
                            </td>
                            <td align="left" class="ScoreLine">
                                <asp:Label runat="server" ID="lblDate" Text='<%#Eval("Date","{0:f}") %>'></asp:Label>
                            </td>
                            <td align="left" class="ScoreLine">
                                <asp:Label runat="server" ID="lblLocation" Text='<%#Eval("Location") %>'></asp:Label>
                            </td>
                            <td align="right" class="ScoreLine">
                                <img src='Teams/<%#SoccerEvaluator.WebSite.App_Code.Countries.GetImageNameCode(Eval("Local").ToString()) %>' border="1" />
                            </td>
                            <td align="center" class="ScoreLine">
                                <asp:Label runat="server" ID="lblLocal" Text='<%#SoccerEvaluator.WebSite.App_Code.Countries.GetName(Eval("Local").ToString()) %>'></asp:Label>
                            </td>
                            <td align="center" class="ScoreLine">
                                <asp:TextBox runat="server" ID="txtLocalGoals" Width="40px" CssClass="Goals"></asp:TextBox>
                            </td>
                            <td align="right" class="ScoreLine">
                                <img src='Teams/<%#SoccerEvaluator.WebSite.App_Code.Countries.GetImageNameCode(Eval("Visitor").ToString()) %>' border="1" />
                            </td>
                            <td align="center" class="ScoreLine">
                                <asp:Label runat="server" ID="Label17" Text='<%#SoccerEvaluator.WebSite.App_Code.Countries.GetName(Eval("Visitor").ToString()) %>'></asp:Label>
                            </td>
                            <td align="center" class="ScoreLine">
                                <asp:TextBox runat="server" ID="txtVisitorGoals" Width="40px" CssClass="Goals"></asp:TextBox>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Button ID="cmdSave" runat="server" OnClick="cmdSave_Click" Width="100px" Height="50px"
                    Text="<% $ Resources:Resource,Save %>" />
                <asp:Button ID="cmdCancel" runat="server" OnClick="cmdCancel_Click" Width="100px"
                    Height="50px" Text="<% $ Resources:Resource,Cancel %>" />
            </td>
        </tr>
    </table>
</asp:Content>
